<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
	<div class="heading">
	<h1>{l('Block Manage','block')}</h1>
	<div class="buttons">
	<a href="{url admin.php?m=block&f=index}" class="fr">{l('All Block','block')}</a>
	<a href="{url admin.php?m=block&f=add}" class="fr">{l('Add Block','block')}</a>
	<a href="{url admin.php?m=block&f=data}" class="fr current">{l('Content Manage','block')}</a>
	</div>
	</div>
	<div class="main">
	<form name="save" method="post" action="?m=block&f=data_add"  enctype="multipart/form-data">
	<input type="hidden" name="blkdatasubmit" value="true" />
	<input type="hidden" name="id" value="{$id}" />
	<input type="hidden" name="blockid" value="{$blockid}" />
	{if $_G['gourl']}<input type="hidden" name="destination" value="{$_G['gourl']}" />{/if}
	<table width="100%" cellspacing="0" class="tb">
		<tr>
			<td colspan="2"><div id="tip"></div></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Title','block')}({l('Required','block')})：</td>
			<td><input type="text" name="block[title]" value="{$block['data']['title']}" class="input" size="50" /> <span></span></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Picture','block')}：</td>
			<td><input type="file" name="tmpimage"  id="advimg0" style="display:none;"/> <input type="text" name="advimage" value="{$block['data']['thumb']}" class="input" size="50"    id="advimg1"/> 
			<a href="javascript:;" id="advimg0a"  onclick="$('#advimg0').attr('name','advimage').show();$('#advimg1').attr('name','tmpadvimage').hide();$('#advimg1a').css('font-weight','normal');$('#advimg0a').css('font-weight','bold');">上传文件</a>&nbsp;&nbsp;
			<a href="javascript:;" id="advimg1a"   onclick="$('#advimg1').attr('name','advimage').show();$('#advimg0').attr('name','tmpadvimage').hide();$('#advimg0a').css('font-weight','normal');$('#advimg1a').css('font-weight','bold');">输入图片地址</a>&nbsp;&nbsp;<span>{if $block['data']['thumb']}<a href="{$block['data']['thumb']}" target="_blank" style=" color: #999999">查看</a>{/if}</span></td>
		
			<!-- td><input type="text" name="block[thumb]" value="{$block['data']['thumb']}" class="input" size="50" /> <span></span></td--></tr>
		<tr>
			<td  width="150"  align="right">{l('Dateline','block')}：</td>
			<td><input type="text" name="block[dateline]" value="{if $block['data']['dateline']}{gdate('Y-m-d H:i:s',$block['data']['dateline'])}{/if}" class="input" size="24"   onclick="showcalendar(event);" /> <span> 0或空表示永不过期</span></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Expiration','block')}：</td>
			<td><input type="text" name="block[expiration]" value="{if $block['expiration']}{gdate('Y-m-d H:i:s',$block['expiration'])}{/if}" class="input" size="24"   onclick="showcalendar(event);" /> <span> 0或空表示永不过期</span></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Display Order','block')}：</td>
			<td><input type="text" name="block[listorder]" value="{$block['listorder']}" class="input" size="5" /> <span> </span></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Status','block')}：</td>
			<td><select  name="block[status]"><option {if $block['status']}selected=""{/if} value="1">{l('Enable','block')}</option><option {if !$block['status']}selected=""{/if} value="0">{l('Disable','block')}</option></select> <span></span></td>
		</tr>
		<tr>
			<td  width="150"  align="right">{l('Summary','block')}：</td>
			<td><textarea rows="3" cols="48"  name="block[summary]" >{$block['data']['summary']}</textarea> <span> </span></td>
		</tr>
		
		<tr class="bg2"><td></td><td><input type="submit" class="button" value="{l('Submit','block')}" />&nbsp; <input type="button" onclick="history.back()" value="返回上一页" class="button"></td></tr>
	</table>
	</form>{script('calendar.js')}
	</div>
</div>
{admintemplate footer}